package com.example.learnspring.constant

/**
 * 请求类型
 */
class RequestType {
    companion object {
        const val All_CONTACT: String = "All_CONTACT"
        const val SEND_SDP: String = "SEND_SDP"
        const val CREATE: String = "CREATE"                         //创建房间
        const val INVITE: String = "INVITE"                         //邀请对方加入房间
        const val CANCEL: String = "CANCEL"                         //取消呼叫
        const val JOIN: String = "JOIN"                             //加入房间
        const val RING: String = "RING"                             //告诉主叫方:"我收到了你的来电,并且响铃了"
        const val REJECT: String = "REJECT"                         //被叫方拒接
        const val SDP_OFFER: String = "SDP_OFFER"                   //发送sdp_offer
        const val SDP_ANSWER: String = "SDP_ANSWER"                 //发送sdp_answer
        const val CANDIDATE: String = "CANDIDATE"                   //发送candidate
        const val REMOVE_CANDIDATES: String = "REMOVE_CANDIDATES"   //移除candidate
        const val LEAVE: String = "LEAVE"                           //正常通话期间挂断
    }
}

/**
 * 响应类型
 */
class ResponseType {
    companion object {
        const val ADD_CONTACT: String = "ADD_CONTACT"               //收到消息:新增联系人
        const val ALL_CONTACT: String = "ALL_CONTACT"               //收到消息:全部联系人
        const val REMOVE_CONTACT: String = "REMOVE_CONTACT"         //收到消息:移除联系人
        const val CREATE_SUCCESS: String = "CREATE_SUCCESS"         //收到消息:主叫方创建房间成功
        const val INVITE: String = "INVITE"                         //收到消息:主叫方邀请我进房间
        const val CANCEL: String = "CANCEL"                         //收到消息:主叫方已取消呼叫
        const val RING: String = "RING"                             //收到消息:被叫方已响铃
        const val REJECT: String = "REJECT"                         //收到消息:被叫方拒接
        const val JOIN_SUCCESS: String = "JOIN_SUCCESS"             //收到消息:被叫方加入房间成功
        const val SDP_OFFER: String = "SDP_OFFER"                   //收到消息:收到sdp_offer
        const val SDP_ANSWER: String = "SDP_ANSWER"                 //收到消息:收到sdp_answer
        const val CANDIDATE: String = "CANDIDATE"                   //收到消息:收到candidate
        const val LEAVE: String = "LEAVE"                           //收到消息:对方已挂断
        const val REMOVE_CANDIDATES: String = "REMOVE_CANDIDATES"   //收到消息:移除candidate
    }
}